/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import com.google.inject.Singleton;
import java.io.File;
import java.io.IOException;
import org.ini4j.InvalidFileFormatException;
import org.ini4j.Wini;

/**
 *
 * @author pyin
 */
@Singleton
public class ConfigLoader {
    public  Wini loadConfig(File[] configFiles) {
        Wini cfg = null;
        for (int i = 0; i < configFiles.length; i++) {
            try {
                cfg = new Wini(configFiles[i]);
            } catch (InvalidFileFormatException ex) {
//                Logger.getLogger(ConfigLoader.class.getName()).log(Level.SEVERE, null, ex);
            } catch (IOException ex) {
//                Logger.getLogger(ConfigLoader.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        return cfg;
    }
}
